<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>供应商信息查看1</title>
    <%@include file="/WEB-INF/jsp/header.jsp"%>
    <link rel="stylesheet" href="${ctx}/statics/moban/plugins/layui/css/layui.css"  />
</head>
<style>
    table td{
        font: 14px 'microsoft yahei', 微软雅黑, Helvetica, Arial, Tahoma, 黑体, 宋体, sans-serif;
    }
</style>
<body>
<div class="container-fluid">
    <div class="panel panel-default">
        <div class="panel-heading">
            <span class="h3">供应商查询</span>
            <a href=".panel-body" class="caret pull-right" data-toggle="collapse"></a>
        </div>
        <div class="panel-body collapse in fade">
            <form id="condition" class="pull-left form-inline">
                <div class="form-group">
                    <label for="">合作日期：</label>
                    <input type="text" class="form-control" oninput="search()" name="startDate" />
                    &nbsp;&nbsp;~&nbsp;&nbsp;
                    <input type="text" class="form-control" oninput="search()" name="endDate"/>
                </div><br/><br/>
                <div class="form-group">
                    <label for="">公司名称：</label>
                    <input class="form-control" type="text" name="name" oninput="search()" placeholder="请输入公司名称">
                </div>
                &nbsp;&nbsp;
                <div class="form-group">
                    <label for="">主营业务：</label>
                    <input class="form-control" type="text" name="practice" oninput="search()" placeholder="请输入业务名称">
                </div>


                <button style="margin-left: 20px" type="button" onclick="search()" class="btn btn-info">
                    <i class="layui-icon"></i> 查询
                </button>
            </form>
        </div>
        <blockquote class="layui-elem-quote">
            <button type="button" class="layui-btn layui-btn-small" id="add" onclick="addPro()">
                <i class="layui-icon"></i> 添加供应商信息
            </button>
            <button type="button" class="layui-btn layui-btn-primary" onclick="report('pdf')"><i class="glyphicon glyphicon-eye-open"></i> 打印预览</button>
            <button type="button" class="layui-btn layui-btn-danger" onclick="report('xls')"><i class="glyphicon glyphicon-export"></i> Excel下载</button>
        </blockquote>
        <table id="providerTable"
               data-pagination-pre-text="上一页"
               data-pagination-next-text="下一页"
               data-click-to-select="true"
               data-toggle="table"
               data-url="${ctx}/provider/search"
               data-striped="true"
               data-toolbar="#toolbar"
               data-toolbar-align="right"
               data-pagination="true"
               data-side-pagination="server"
        >
            <thead>
            <tr>
                <th data-field="proNum">公司编号</th>
                <th data-field="proName">公司名称</th>
                <th data-field="proReaddress">企业地址</th>
                <th data-field="proPerson">负责人</th>
                <th data-field="proPhone">联系方式</th>
                <th data-field="proPractice">主要供应业务</th>
                <th data-field="proValidity">合作结束日期</th>
                <th data-formatter="caozuo" data-events="optEvents">操作</th>
            </tr>
            </thead>
        </table>
    </div>
    <div id="addPro">

    </div>
    <div id="updatePro">

    </div>
    <div class="myForm" style="display: none;">
        <form class="form-horizontal">
            <input type="hidden" name="proId" value=""/>
            <div class="form-group">
                <label for="" class="control-label col-md-3">公司编号：</label>
                <div class="form-group col-md-5">
                    <input type="text" placeholder="8位数字加字母或数字" name="proNum" onkeyup="checkProNum()" onblur="checkProNum()" class="form-control">
                </div>
                <p class=" col-md-4" style="line-height: 34px; ">
                    <i style="color: red;">*</i>
                    <span id="error_proNum"></span>
                </p>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-3">公司名称：</label>
                <div class="form-group col-md-5">
                    <textarea rows="2" type="text" name="proName" onkeyup="checkProName()" onblur="checkProName()" class="form-control"></textarea>
                </div>
                <p class=" col-md-4" style="line-height: 34px; ">
                    <i style="color: red;">*</i>
                    <span id="error_proName"></span>
                </p>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-3">企业地址：</label>
                <div class="form-group col-md-5">
                    <textarea rows="2" type="text" name="proReaddress" onkeyup="checkproReaddress()" onblur="checkproReaddress()" class="form-control"></textarea>
                </div>
                <p class=" col-md-4" style="line-height: 34px; ">
                    <i style="color: red;">*</i>
                    <span id="error_proReaddress"></span>
                </p>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-3">负责人：</label>
                <div class="form-group col-md-5">
                    <input type="text" name="proPerson" onkeyup="checkproPerson()" onblur="checkproPerson()" class="form-control">
                </div>
                <p class=" col-md-4" style="line-height: 34px; ">
                    <i style="color: red;">*</i>
                    <span id="error_proPerson"></span>
                </p>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-3">联系方式：</label>
                <div class="form-group col-md-5">
                    <input type="text" placeholder="手机号码或座机号" name="proPhone" onkeyup="checkproPhone()" onblur="checkproPhone()" class="form-control">
                </div>
                <p class=" col-md-4" style="line-height: 34px; ">
                    <i style="color: red;">*</i>
                    <span id="error_proPhone"></span>
                </p>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-3">合作结束日期：</label>
                <div class="form-group col-md-5">
                    <input type="text" placeholder="yyyy-MM-dd" name="proValidity" onkeyup="checkproValidity()" onblur="checkproValidity()" class="form-control">
                </div>
                <p class=" col-md-4" style="line-height: 34px; ">
                    <i style="color: red;">*</i>
                    <span id="error_proValidity"></span>
                </p>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-3">主要供应业务：</label>
                <div class="form-group col-md-5">
                    <textarea rows="5" name="proPractice" onkeyup="checkproPractice()" onblur="checkproPractice()" class="form-control"></textarea>
                </div>
                <p class=" col-md-4" style="line-height: 34px; ">
                    <i style="color: red;">*</i>
                    <span id="error_proPractice"></span>
                </p>
            </div>
        </form>
    </div>
</div>
<%@include file="/WEB-INF/jsp/footer.jsp"%>
<script src="${ctx}/res/js/Provider.js"></script>
</body>
</html>